package model;

import model.repository.ActorsRES;
import model.repository.DirectorsRES;
import model.repository.MoviesRES;
import model.repository.SaloonsRES;
import model.repository.SeansRES;
import model.repository.TicketsRES;
import model.repository.TypesRES;

public class DbContext {

	private static DbContext INSTANCE;

	private ActorsRES actorsRES;
	private DirectorsRES directorsRES;
	private MoviesRES moviesRES;
	private SaloonsRES saloonsRES;
	private SeansRES seansRES;
	private TicketsRES ticketsRES;
	private TypesRES typesRES;

	private DbContext() {
	}

	public static DbContext getInstance() {
		if (INSTANCE == null)
			INSTANCE = new DbContext();
		return INSTANCE;
	}

	public ActorsRES getActorsRES() {
		if (actorsRES == null)
			actorsRES = new ActorsRES();
		return actorsRES;
	}

	public DirectorsRES getDirectorsRES() {
		if (directorsRES == null)
			directorsRES = new DirectorsRES();
		return directorsRES;
	}

	public MoviesRES getMoviesRES() {
		if (moviesRES == null)
			moviesRES = new MoviesRES();
		return moviesRES;
	}

	public SaloonsRES getSaloonsRES() {
		if (saloonsRES == null)
			saloonsRES = new SaloonsRES();
		return saloonsRES;
	}

	public SeansRES getSeansRES() {
		if (seansRES == null)
			seansRES = new SeansRES();
		return seansRES;
	}

	public TicketsRES getTicketsRES() {
		if (ticketsRES == null)
			ticketsRES = new TicketsRES();
		return ticketsRES;
	}

	public TypesRES getTypesRES() {
		if (typesRES == null)
			typesRES = new TypesRES();
		return typesRES;
	}

}
